package com.eng.carro.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table( name = "core_delivery_route" )
public class DeliveryRoute implements Serializable {

  private static final long serialVersionUID = -970111776715435347L;
  
  private Integer id;
  private DeliveryPlace deliveryPlace;
  private String rfId;
  private String value;
  
  
  public DeliveryRoute() {
  }
  
  public DeliveryRoute( Integer id ) {
	setId( id );
  }
  
  @Id
  @GeneratedValue( strategy=GenerationType.SEQUENCE )
  @Column( name="id" )
  public Integer getId() { return id; }
  public void setId(Integer id) { this.id = id; }
  
  @ManyToOne
  @JoinColumn( name="ref_delivery_place" )
  public DeliveryPlace getDeliveryPlace() { return deliveryPlace; }
  public void setDeliveryPlace(DeliveryPlace deliveryPlace) { this.deliveryPlace = deliveryPlace; }

  @Column( name = "rf_id" )
  public String getRfId() { return rfId; }
  public void setRfId(String rfId) { this.rfId = rfId; }

  @Column( name = "value" )
  public String getValue() { return value; }
  public void setValue(String value) { this.value = value; }
  
}
